package com.cxy.datawarehouse.service;

import com.cxy.datawarehouse.entity.User;
import com.cxy.datawarehouse.mapper.UserMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service
public class UserService {
    @Resource
    UserMapper userMapper;

    public User getUserByUserName(String userName) {
        return userMapper.getUserByUserName(userName);
    }

    public User getUserByPhone(String phone){
        return userMapper.getUserByPhone(phone);
    }

    public void create(User user){
        userMapper.save(user);
    }
}
